package com.cjkj.system.api;

import com.cjkj.common.core.constant.SecurityConstants;
import com.cjkj.common.core.constant.ServiceNameConstants;
import com.cjkj.common.core.domain.R;
import com.cjkj.common.core.domain.runset.RunSetParam;
import com.cjkj.system.api.factory.RemoteTJ03ServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteTJ03Service",value = ServiceNameConstants.EQUIPMENT_SERVICE, fallbackFactory = RemoteTJ03ServiceFallbackFactory.class )
public interface RemoteTJ03Service {

    /**
     * 发送命令
     * @param runSet
     */
    @PostMapping("/equipment/sendCommand/{equipmentNo}")
    R<Object> sendCommand(@PathVariable("equipmentNo") String equipmentNo, @RequestBody RunSetParam runSet, @RequestHeader(SecurityConstants.FROM_SOURCE)String source);

}
